<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../vue.js"></script>
    <script src="../vue-min.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" @keyup.esc="cleanInput">
    </div>
    <script>
        const vr = new Vue({
            el: "#app", //表示当前的vr属性要控制的类名
            data: {

            },
            methods:{
                cleanInput(e){
                    console.log("shufale");
                    e.target.value=''
                }
            }

        })
    </script>
</body>

</html>